//acw


//https://www.acwing.com/problem/content/3780/


//递归

#include<bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const int N=2e5+10;
#define INF 0x3f3f3f3f;
typedef long long int ll;
#define close(); std::ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
//----------------------------------------------------------------------------//
int n;
void solve()
{
	cin>>n;
	string s;
	cin>>s;

	string s2=s;

	vector<int> v;
	bool ok=true;
	for(int i=0;i<s.size();i++)//变黑
	{
		if(s[i]=='B') continue;
		else
		{
			v.push_back(i+1);
			s[i]='B';
			if(i+1==s.size()) ok=false;
			else
			{
				if(s[i+1]=='B') s[i+1]='W';
				else s[i+1]='B';
			}
		}
	}
	if(ok)
	{
		cout<<v.size()<<'\n';
		for(auto&k:v) cout<<k<<" ";
		if(!v.empty())cout<<'\n';
		return;
	}


	vector<int> v2;
	ok=true;
	for(int i=0;i<s2.size();i++)//变白
	{
		if(s2[i]=='W') continue;
		else
		{
			v2.push_back(i+1);
			s2[i]='W';
			if(i+1==s2.size()) ok=false;
			else
			{
				if(s2[i+1]=='B') s2[i+1]='W';
				else s2[i+1]='B';
			}
		}
	}
	if(ok)
	{
		cout<<v2.size()<<'\n';
		for(auto&k:v2) cout<<k<<" ";
		if(!v2.empty())cout<<'\n';
		return;
	}

	cout<<-1<<'\n';
	
}

int main()
{
	close();
	int T; cin>>T;
	while (T--) solve();
	return 0;
}

//每个位置最多修改一次 